g_return_if_fail (priv->popup_widget == (GtkWidget *) menu);
- g_signal_handlers_disconnect_by_func (menu->toplevel,
+ g_signal_handlers_disconnect_by_func (menu->priv->toplevel,
gtk_combo_box_menu_show,
combo_box);
- g_signal_handlers_disconnect_by_func (menu->toplevel,
+ g_signal_handlers_disconnect_by_func (menu->priv->toplevel,
gtk_combo_box_menu_hide,
combo_box);
* menu itself, since the menu is not shown/hidden when it is
* popped up while torn-off.
*/
- g_signal_connect (GTK_MENU (popup)->toplevel, "show",
+ g_signal_connect (GTK_MENU (popup)->priv->toplevel, "show",
G_CALLBACK (gtk_combo_box_menu_show), combo_box);
- g_signal_connect (GTK_MENU (popup)->toplevel, "hide",
+ g_signal_connect (GTK_MENU (popup)->priv->toplevel, "hide",
G_CALLBACK (gtk_combo_box_menu_hide), combo_box);
gtk_menu_attach_to_widget (GTK_MENU (popup),
menu_ypos -= child_allocation.height / 2;
}
- children = GTK_MENU_SHELL (combo_box->priv->popup_widget)->children;
+ children = GTK_MENU_SHELL (combo_box->priv->popup_widget)->priv->children;
while (children)
{
child = children->data;
gtk_combo_box_menu_position_over (menu, x, y, push_in, user_data);
}
- if (!gtk_widget_get_visible (GTK_MENU (priv->popup_widget)->toplevel))
- gtk_window_set_type_hint (GTK_WINDOW (GTK_MENU (priv->popup_widget)->toplevel),
+ if (!gtk_widget_get_visible (GTK_MENU (priv->popup_widget)->priv->toplevel))
+ gtk_window_set_type_hint (GTK_WINDOW (GTK_MENU (priv->popup_widget)->priv->toplevel),
GDK_WINDOW_TYPE_HINT_COMBO);
}
priv->action = NULL;
priv->use_action_appearance = TRUE;
- menu_item->submenu = NULL;
- menu_item->toggle_size = 0;
- menu_item->accelerator_width = 0;
+ menu_item->priv->submenu = NULL;
+ menu_item->priv->toggle_size = 0;
+ menu_item->priv->accelerator_width = 0;
if (gtk_widget_get_direction (GTK_WIDGET (menu_item)) == GTK_TEXT_DIR_RTL)
priv->submenu_direction = GTK_DIRECTION_LEFT;
else
gtk_widget_get_preferred_width (child, &child_min, &child_nat);
- if ((menu_item->submenu && !GTK_IS_MENU_BAR (parent)) || priv->reserve_indicator)
+ if ((menu_item->priv->submenu && !GTK_IS_MENU_BAR (parent)) || priv->reserve_indicator)
{
guint arrow_spacing;
gint arrow_size;
min_height += child_min;
nat_height += child_nat;
- if ((menu_item->submenu && !GTK_IS_MENU_BAR (parent)) || priv->reserve_indicator)
+ if ((menu_item->priv->submenu && !GTK_IS_MENU_BAR (parent)) || priv->reserve_indicator)
{
gint arrow_size;
if (child != NULL && gtk_widget_get_visible (child))
{
- GtkMenuItemPrivate *priv = GET_PRIVATE (menu_item);
gint child_min, child_nat;
gint arrow_size = 0;
- if ((menu_item->submenu && !GTK_IS_MENU_BAR (parent)) || priv->reserve_indicator)
+ if ((priv->submenu && !GTK_IS_MENU_BAR (parent)) || priv->reserve_indicator)
{
guint arrow_spacing;
min_height += child_min;
nat_height += child_nat;
- if (menu_item->submenu && !GTK_IS_MENU_BAR (parent))
+ if ((priv->submenu && !GTK_IS_MENU_BAR (parent)) || priv->reserve_indicator)
{
min_height = MAX (min_height, arrow_size);
nat_height = MAX (nat_height, arrow_size);
child = gtk_bin_get_child (bin);
if (child)
{
- GtkMenuItemPrivate *priv = GET_PRIVATE (menu_item);
GtkStyle *style;
guint horizontal_padding;
guint border_width;
child_allocation.x += allocation->x;
child_allocation.y += allocation->y;
- if ((menu_item->submenu && !GTK_IS_MENU_BAR (parent)) || priv->reserve_indicator)
+ if ((priv->submenu && !GTK_IS_MENU_BAR (parent)) || priv->reserve_indicator)
{
guint arrow_spacing;
gint arrow_size;
x, y, w, h);
}
- if (menu_item->submenu && !GTK_IS_MENU_BAR (parent))
+ if (priv->submenu && !GTK_IS_MENU_BAR (parent))
{
gint arrow_x, arrow_y;
gint arrow_size;
#include "gtkcellareacontext.h"
#include "gtkcelllayout.h"
#include "gtkcellview.h"
+#include "gtkmenushellprivate.h"
#include "gtkprivate.h"
{
/* Destroy the header item and then the following separator */
gtk_widget_destroy (item);
- gtk_widget_destroy (GTK_MENU_SHELL (menu)->children->data);
+ gtk_widget_destroy (GTK_MENU_SHELL (menu)->priv->children->data);
priv->menu_with_header = FALSE;
}
/* For header items we need to set the sensitivity
* of the following separator item
*/
- if (GTK_MENU_SHELL (menu)->children &&
- GTK_MENU_SHELL (menu)->children->next)
+ if (GTK_MENU_SHELL (menu)->priv->children &&
+ GTK_MENU_SHELL (menu)->priv->children->next)
{
GtkWidget *separator =
- GTK_MENU_SHELL (menu)->children->next->data;
+ GTK_MENU_SHELL (menu)->priv->children->next->data;
gtk_widget_set_sensitive (separator, sensitive);
}
{
GList *i;
- for (i = GTK_MENU_SHELL (menu)->children; i; i = i->next)
+ for (i = GTK_MENU_SHELL (menu)->priv->children; i; i = i->next)
{
guint l, r, b, t;